<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>条件判断</title>
</head>
<body>
    <div th:if="${sex eq 1}">
        男
    </div>
    <div th:if="${sex eq 0}">
        女
    </div>
    <div>==================</div>
    <div th:unless="${sex eq 0}">
        女
    </div>
    <h1>th:switch/th:case</h1>
    <div th:switch="${productType}">
        <span th:case="0">产品0</span>
        <span th:case="1">产品1</span>
        <span th:case="*">无此产品</span>
    </div>
</body>
</html>